<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="description" content="Spring WebFlux Workshop" />
<meta name="author" content="Violeta Georgieva and Brian Clozel" />
<title>Spring Trading application</title>
<link rel="stylesheet" href="/webjars/bootstrap/3.3.7/css/bootstrap-theme.min.css" />
<link rel="stylesheet" href="/webjars/bootstrap/3.3.7/css/bootstrap.min.css" />
</head>
<body>
	<nav class="navbar navbar-default">
		<div class="container-fluid">
			<div class="navbar-header">
				<a class="navbar-brand" href="/">Spring Trading application</a>
			</div>
			<div id="navbar" class="navbar-collapse collapse">
				<ul class="nav navbar-nav">
					<li class="active"><a href="/">Home</a></li>
					<li><a href="/quotesPage">Quotes</a></li>
					<li><a href="/websocket">Websocket</a></li>
				</ul>
			</div>
		</div>
	</nav>
	<div class="container wrapper">
		<h2>Trading users</h2>
		<table>
			<tr>
				<td align="left">&nbsp;共 <b><font color="red"><span th:text="${total}"></font></b> 条<b><font color="red"> <span
							th:text="${totalPage}"></font></b> 页 - 这是第 <b> <font color="red"><span th:text="${pageNo}"></font>
				</b>页&nbsp; | &nbsp; 
				    <a href="./list?pageNo=1">首页</a>&nbsp; 
				    <a th:href="'./list?pageNo='+${pageNo<=1?1:pageNo-1}">前一页</a>&nbsp; 
				    <a th:href="'./list?pageNo='+${pageNo+1>totalPage?totalPage:pageNo+1}">后一页</a>&nbsp;
					<a th:href="'./list?pageNo='+${totalPage}">末页</a>&nbsp;
				</td>
			</tr>
		</table>
		<table class="table table-striped">
			<thead>
				<tr>
					<th>#</th>
					<th>Id</th>
					<th>User name</th>
					<th>Full name</th>
					<th>Operation <a href="/user/add">新增</a></th>
				</tr>
			</thead>
			<tbody>
				<tr th:each="user,stats: ${users}">
					<th th:text="${10*(pageNo-1)+stats.count}"></th>
					<td scope="row" th:text="${user.id}">42</td>
					<td th:text="${user.userName}">janedoe</td>
					<td th:text="${user.fullName}">Jane Doe</td>
					<td><a th:href="'/user/delete/'+${user.id}">delete</a> <a th:href="'/user/update/'+${user.id}">update</a></td>
				</tr>
			</tbody>
		</table>
	</div>
	<script type="text/javascript" src="/webjars/jquery/1.11.1/jquery.min.js"></script>
	<script type="text/javascript" src="/webjars/bootstrap/3.3.7/js/bootstrap.min.js"></script>
</body>
</html>